﻿using UnityEngine;
using System.Collections;

[System.Serializable]
public class CommodityTemplet  {
	public string name;

	public int minNormalPrice;
	public int maxNormalPrice;

	public int minLowPrice;
	public int maxLowPrice;

	public int minHighPrice;
	public int maxHighPrice;

	public Commodity instantiate()
	{
		Commodity commodity = new Commodity();
		commodity.name = name;
		commodity.price = Random.Range(minNormalPrice, maxNormalPrice);
		return commodity;
	}
}

public class Commodity {
	public string name;
	public int price;
	public int num;

	public override string ToString ()
	{
		return name + ", price:" + price + ", num:" + num;
	}

	public Commodity clone()
	{
		Commodity cloneOne = new Commodity ();
		cloneOne.name = name;
		cloneOne.price = price;
		cloneOne.num = num;
		return cloneOne;
	}
}
